package com.cs.study.homework._0223.Demo2;

public class Demo3 {
    public static void main(String[] args) {
        Teacher teacher = new Teacher();
        teacher.learn();
        Student student = new Student();
        student.learn();
    }
}
abstract class Person{
    String name;
    int age;
    boolean gender;
    abstract void eat();
    abstract void sleep();
}

class Teacher extends Person implements LearnSkill{
    public Teacher() {
    }

    @Override
    void eat() {
        System.out.println("eat");
    }

    @Override
    void sleep() {
        System.out.println("sleep");
    }

    @Override
    public void learn() {
        System.out.println("增强语言能力");
    }
}

class Student extends Person implements LearnSkill{
    public Student() {
    }

    @Override
    void eat() {
        System.out.println("eat");
    }

    @Override
    void sleep() {
        System.out.println("sleep");
    }

    @Override
    public void learn() {
        System.out.println("增强实践能力");
    }
}
interface LearnSkill{
    void learn();
}
